package furnitures 
{
	import alternativa.engine3d.objects.Mesh;
	import drawing.IPalette;
	/**
	 * ...
	 * @author Dmitriy Gaiduk
	 */
	public class DecorMesh extends Mesh
	{
		private var _decorShape:Array;
		private var _scaleFactor:Number;
		
		public function DecorMesh(shapeArr:Array, scaleFactor:Number) 
		{
			_decorShape = shapeArr;
			_scaleFactor = scaleFactor;
			initElement();
		}
		
		
		public function setPalette(palette:IPalette):void {
			
		}
		
		private function initElement():void 
		{
			adjustScale();
			
		}
		
		
		
		private function adjustScale():void{
			scaleArrays(_decorShape);
		}
		
		private function scaleArrays(arr:Array):void {
			if (arr == null ) {
				return;
			}
			for (var i:int =0 ; i < arr.length; i++)
			{
				scaleArrayXY(arr[i]);
			}
		}
		
		private function scaleArrayXY(arr:Array):void {
			if (arr == null ) {
				return;
			}
			for (var i:int = 0; i < arr.length; i++)
			{
				arr[i] *= _scaleFactor;
			}
		}
		
		
		
	}

}